#include<stdio.h>
int main()
{
    long n,k = 0;
    long sum =0;
    scanf("%ld %ld",&n,&k);
    if(k==0)
    {
        printf("%ld\n",n*n);
        
    }
    else
    {
        for(long j = k+1;j<=n;j++)
        {
                long help = n%j<k?0:(n%j)-k+1;
                sum+=(j-k)*(n/j)+help;
        }
    printf("%ld",sum);
    }
    return 0;
}

